package com.wanho.es.repositories;

import com.wanho.java156.po.Product;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

import java.util.List;

/**
 * springDATA 模块
 */
public interface ProdcutRepository extends ElasticsearchRepository<Product,String>{
    List<Product> findProductsByProductname(String productname) ;

    Page<Product> findProductsByProductnameOrProductdesc(String productname, String productdesc, Pageable pageable) ;

}
